library("unsupervisedMicroarray")
source("./generatePReducersList.R")
source("./generateReducersList.R")
source("./generateRCComputerList.R")
source("./generateNParamAlgList.R")
data(brain)
data(leukemia)
data(carcinoma)
data(colon)

print("generate Reducers and Clusterizers")
reducers <- generateReducersList()
clusts <-generateNParamAlgList()
comps <- generateRCComputerList (reducers,clusts)


#score
print("generate indices list")
indList <-list(new("HARandEClusterScore"), new("NVIEClusterScore"),new("BCEClusterScore"),
		new("IIClusterScore"),new("StdbwIClusterScore"),new("SilhIClusterScore"))
#indList <-list(new("IIClusterScore"))
#indList <-list(new("StdbwIClusterScore"),new("SilhIClusterScore"))
indListLen <-length(indList)
#final result
wt <- new("WilcoxonHtester")
pTester <- new("PHTestBFrameworkFinalResult",hTester=wt)
#bootstraped set
print("generate Bootstrapers")
nboots <-1
rbootsList <-list()
rbootsListCnt <-1
rbootsList[[rbootsListCnt]] <- new("RowBootstrapedSet",list(X=brain$X,Y=brain$Y),nboots)
rbootsListCnt <- rbootsListCnt +1

print("generate Noise Vec")
noiseSdVec <- seq(from=0.001,to=0.01,by=0.01)
noiseSdVecLen <-length(noiseSdVec)
for(i in 1:noiseSdVecLen){
	rbootsList[[rbootsListCnt]]	<- new("NormNoiseRowBootstrapedSet",
						list(X=brain$X,Y=brain$Y),nboots,percentOfSdev=noiseSdVec[i])
	rbootsListCnt <- rbootsListCnt +1
}
print("concatenate with 0 noise")
noiseSdVec <- c(0.0 ,noiseSdVec)
#sets
setList <-list(
		brain
)


for(bSet in 1:length(rbootsList)){
	print("NewBoot")
	for(ind in 1:indListLen){
		print("NewIndex")
		dirName <- paste("./NParamClust",class(indList[[ind]]),as.character(noiseSdVec[bSet]),sep="")
		runner <-new("HTestRunner",setList=setList, compList=comps,
				bootstraperPrototype=rbootsList[[bSet]],
				finalResultComp=pTester, scoreObj=indList[[ind]],
				resultsDirectory=dirName)
		res <- runTest(runner)
}
}